// 对象的定义
// 1. 声明定义
var myobj={
    key:3
}
// 2. 构造形式
var myobj1=new Object();
myobj1.key=3 // 在构造形式中必须逐个添加属性
// new
var s='i am you';
console.log(typeof s);// string
console.log(s instanceof String)// false
var s1=new String('i am you');
console.log(typeof s1);// object
console.log(s1 instanceof String)// true;
// 键访问[]
var myObject = { }; 
myObject[true] = "foo"; 
myObject[3] = "bar"; 
//myObject.3=9; 
myObject[myObject] = "baz"; 
console.log(myObject[true]); // "foo"
console.log(myObject[3]); // "bar"
console.log(myObject["[object Object]"]); // "baz"
